<!DOCTYPE html>
<html class="x-admin-sm" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>博以至客会员</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="../css/font.css">
    <link rel="stylesheet" href="../css/xadmin.css">
    <script src="../layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../component/js/xadmin.js"></script>
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body class="layui-layout-body">
<!--    <input type="hidden" name="token" th:value="${session.token}">-->
<div class="x-nav">
            <span class="layui-breadcrumb">
                <a href="">首页</a>
                <a href="">演示</a>
                <a>
                    <cite>导航元素</cite></a>
            </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
        <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
    </a>
</div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<div>
    <section class="msg-remark">
        <form class="layui-form" action=""  >
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-block">
                    <input  type="hidden" id="links_id" name="links_id" required lay-verify="required" placeholder="请输入好友id"  autocomplete="off" class="layui-input" th:value="${links.links_id}">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">好友昵称:</label>
                <div class="layui-input-block">
                    <input type="text" id="links_name"  name="links_name" required lay-verify="required" placeholder="请输入好友昵称" autocomplete="off" class="layui-input" th:value="${links.links_name}">
                </div>
            </div>
            <br>
            <br>
            <div class="layui-form-item">
                <label class="layui-form-label">好友标题:</label>
                <div class="layui-input-block">
                    <input type="text" id="links_title"  name="links_title" required lay-verify="required" placeholder="请输入好友标题" autocomplete="off" class="layui-input" th:value="${links.links_title}">
                </div>
            </div>
            <br>
            <br>
            <div class="layui-form-item">
                <label class="layui-form-label">好友网站url:</label>
                <div class="layui-input-block">
                    <input type="text" id="links_url" name="links_url" required lay-verify="required" placeholder="请输入好友网站url" autocomplete="off" class="layui-input" th:value="${links.links_url}">
                </div>
            </div>
            <br>
            <br>
            <div class="layui-form-item">
                <label class="layui-form-label">好友图片url:</label>
                <div class="layui-input-block">
                    <input type="text" id="links_img" name="links_img" required lay-verify="required" placeholder="请输入好友图片url" autocomplete="off" class="layui-input" th:value="${links.links_img}">
                </div>
            </div>
            <br>
            <br>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button id="submit1"  type="button" data-type="reload" class="layui-btn layui-btn-primary">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </section>
</div>
<script src="../component/js/jquery-3.3.1.js"></script>
<script src="../layui/layui.js"></script>
<script src="../js/yss/gloable.js"></script>
<script src="../js/plugins/nprogress.js"></script>
<script>NProgress.start();</script>
<script src="../js/pagemessage.js"></script>
<script>NProgress.start();</script>
<script>
    window.onload = function () {
        NProgress.done();
    };
</script>
<script  th:inline="javascript">
    layui.use('form', function() {
        var form = layui.form;
        $("#submit1").on("click", function () {
            $.ajax({
                type:'post',
                url:'/links/updateLinks',
                data:{links_id:$("#links_id").val(),links_name:$("#links_name").val(),links_title:$("#links_title").val(),links_url:$("#links_url").val(),links_img:$("#links_img").val()},
                success:function (data) {
                    if (data.status==200){
                        layer.confirm('修改成功!')

                    }else {
                        layer.confirm('修改失败!')
                    }

                },
                error:function () {
                    layer.confirm('修改失败!')
                }
            })

        })
    });
</script>
</body>
</html>